var baseUrl = "http://61.155.85.77:8999";
function getJSONData(url, data, callback) {
	$.ajax({
		type: "get",
		async: true,
		data: data,
		url: url, //这里是网址
		success: function(json) {
			callback(json)
		},
		timeout: 30000,
		error: function(XMLHttpRequest, textStatus, errorThrown) {
			console.error(url, textStatus + ": " + errorThrown);
		}
	});
}
function getResult(viewName,fieldName,vd,callback){
	var url = baseUrl+"/getResult?modelId="+modelId+"&viewName="+viewName+"&fieldName="+fieldName+"&fieldNameCn="+fieldName+"&vd="+vd;
	getJSONData(url, {}, function(data){
		if(data.success){
			//console.log(data);
			var fieldName = "";
			var fieldArr = [];
			var fieldType = "";
			$.each(data.data,function(j,f){
				fieldName = f.fieldName;
				fieldType = f.fieldType?f.fieldType:"string";
				fieldArr.push(f.value);
			})
			var bk = fieldArr;
			if(typeof callback == "function"){
				callback(bk);
			}
		}
	})
}